package com.zadetk.helpyou.activities;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.DividerItemDecoration;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.BaseAdapter;
import android.widget.Toast;

import com.zadetk.helpyou.R;
import com.zadetk.helpyou.adapter.AboutAdapter;
import com.zadetk.helpyou.base.AbsActivity;
import com.zadetk.helpyou.base.BaseActivity;

import java.util.ArrayList;
import java.util.List;

/**
 * 5-1关于帮你
 */
public class AboutActivity extends AbsActivity {
    private RecyclerView about;
    List<String> num = new ArrayList<>();
    @Override
    public int setView() {
        return R.layout.activity_about;
    }

    @Override
    public void initBasic(Bundle savedInstanceState) {
        about = findViewById(R.id.about_rv);
        setTopTitle("关于帮你");
        for (int i = 0; i < 10; i++) {
            num.add("aaaa" + i);
        }
        LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this);
        linearLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);
        about.setLayoutManager(linearLayoutManager);
        about.addItemDecoration(new DividerItemDecoration(this, linearLayoutManager.getOrientation()));
        AboutAdapter aboutAdapter = new AboutAdapter(num);
        about.setAdapter(aboutAdapter);
    }

//    private RecyclerView about;
//    List<String> num = new ArrayList<>();
//    @Override
//    protected void onCreate(Bundle savedInstanceState) {
//        super.onCreate(savedInstanceState);
//        setContentView(R.layout.activity_about);
//        about = findViewById(R.id.about_rv);
//        for (int i = 0; i < 10; i++) {
//            num.add("aaaa" + i);
//        }
//        LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this);
//        linearLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);
//        about.setLayoutManager(linearLayoutManager);
//        about.addItemDecoration(new DividerItemDecoration(this, linearLayoutManager.getOrientation()));
//        AboutAdapter aboutAdapter = new AboutAdapter(num);
//        about.setAdapter(aboutAdapter);
//
//
//    }
}
